Client fault tolerant connection by multiple hosts#13
Open
df530 wants to merge 1424 commits intoupdated-masterfrom
Open
Client fault tolerant connection by multiple hosts#13df530 wants to merge 1424 commits intoupdated-masterfrom
df530 wants to merge 1424 commits intoupdated-masterfrom
Conversation
a3e748c to
94e48b0
Compare
Member
PolyProgrammist
left a comment
There was a problem hiding this comment.
Please add description
programs/client/Client.cpp
Outdated
Member
There was a problem hiding this comment.
You set it here, but anyway you do it later in a round robin loop. Do you really need it here?
Collaborator
Author
There was a problem hiding this comment.
I need to set "host" before round-robin, because I need to create ConnectionParameters(config()) in connect method. I thought, that it would be better to set config() before calling connect.
94e48b0 to
962d851
Compare
fix the run command and add example
Before this patch current_user/current_address will be preserved from the previous query. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Update list-versions.sh, update version_date.tsv
…-for-show-grants Fix checking grants for SHOW GRANTS
Cmake leftovers cleanup
…ssword Add 'clickhouse-client --password' comment to the scripts used in Qui…
Disable data skipping indexes by default for queries with FINAL
Support async inserts in clickhouse-client for queries with inlined data
3253ae1 to
c1df291
Compare
…rays Fix consecutive backward seeks in seekable read buffers
…database-memory Fix wrong engine in SHOW CREATE DATABASE with engine Memory ClickHouse#34225
Add table function format(format_name, data)
Add options for clickhouse-format.
Add composability to casting and index operators
Fix clang tidy
…-fault-tolerant-connection
Support UUID in MsgPack format
…temp-tables-via-grpc Fix inserting to temporary tables via gRPC.
Update clickhouse-keeper.md
…metadata Better local metadata comparison with ZooKeeper metadata
Fix segfault in schema inference from url
add function addressToLineWithInlines
Fix various issues when projection is enabled by default
Method called on already moved
Use UTC in docker images
Revert "Merge pull request ClickHouse#34373 from ClickHouse/docker-tz"
Add submodule minizip
…-fault-tolerant-connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
New Feature
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Parameter
--hostcan accept multiple hosts. In case of unavailability of one of them, the client will try to connect to the next one.Detailed description / Documentation draft:
Feature accept setting multiple hosts for connection. It approves fault tolerance of connection because when one host isn't alive client can try to connect to another one.
Parameter
--hostcan accept multiple addresses. Every address must contain resolvable host and can also contain portif it isn't set, port from--portis used). Example of usage:clickhouse-client --host host1:1 host2 host3:3 --port 2 --query "SELECT 1"When multiple addresses are passed to the host argument and the first one is unavailable, the client will try to connect to the next one (round robin approach). In the example, if client can't connect to
host1:1, it will try to connect tohost2and port2, which is set in--port.